//
//  UIStoryboard+LoadViewController.m
//  WBUQ
//
//  Created by yangaichun on 15/11/16.
//  Copyright © 2015年 com.weiba66. All rights reserved.
//

#import "UIStoryboard+LoadViewController.h"

@implementation UIStoryboard(LoadViewController)


+ (UIViewController *)ViewControllerFromMainStoryboardWihtIndentifier:(NSString *)indentifer;{
    return [self ViewControllerFromStoryboard:@"Main" MainBundleWihtIndentifier:indentifer];
}


+ (UIViewController *)ViewControllerFromStoryboard:(NSString *)name MainBundleWihtIndentifier:(NSString *)indentifer;{
    return [self ViewControllerFromStoryboard:name Bundle:nil Indentifier:indentifer];
}

+ (UIViewController *)ViewControllerFromStoryboard:(NSString *)name Bundle:(NSString *)bundle Indentifier:(NSString *)indentifer;{
    UIViewController * vc = nil;
    UIStoryboard *sb = [UIStoryboard storyboardWithName:name bundle:[NSBundle bundleWithPath:bundle]];
    if (sb) {
        vc = [sb instantiateViewControllerWithIdentifier:indentifer];
    }
    return vc;
}

@end
